from rest_framework.response import Response
from rest_framework.views import APIView

from leisurely.serializer.hotcities import HotcitiesSerializer
from six_it.models import City


class Hotcities(APIView):

    def get(self, request):

        cities = City.objects.filter(ishot=1)
        serializers = HotcitiesSerializer(cities, many=True)

        return Response(serializers.data)